import request from '../utils/request';

/**
 * 获得全部菜单
 */
export const getMenuList = () => {
     return request({
        url: '/menu/getMenuList',
        method: 'get'
    })
}

/**
 * 保存菜单
 * @param data
 */
export const saveMenu = (data: Object) => {
    return request({
        url: '/menu/saveMenu',
        method: "POST",
        data: data
    })
}

/**
 * 删除菜单
 * @param id
 */
export const removeMenu = (id:number) => {
    return request({
        url: `/menu/removeMenu?id=${id}`,
        method: "post"
    })
}

